//
//  JMFeedbackViewController.m
//  VoluntaryStar
//
//  Created by xiaorui on 15/8/31.
//  Copyright (c) 2015年 ios. All rights reserved.
//

#import "JMFeedbackViewController.h"
#import "JMAppNetworkClient.h"

@interface JMFeedbackViewController ()<UITextViewDelegate>


@property (nonatomic, strong) UITextView *textView;

@property (nonatomic, strong) UIButton *submitBtn;

@end

@implementation JMFeedbackViewController

- (UITextView *)textView
{
    if (!_textView) {
        _textView = [[UITextView alloc]init];
        _textView.layer.masksToBounds = YES;
        _textView.layer.borderColor = [UIColorFromRGB(0xcdcdcd) CGColor];
        _textView.layer.borderWidth = 1.0;
        _textView.textColor = [UIColor lightGrayColor];
        _textView.keyboardType = UIKeyboardTypeDefault;//键盘类型
        _textView.scrollEnabled = YES;//是否可以拖动
//        _textView.autoresizingMask = UIViewAutoresizingFlexibleHeight;
        _textView.delegate = self;//设置它的委托方法
        _textView.text = @"Now is the time for all good developers to come to serve their country.\n";//设置它显示的内容
        _textView.backgroundColor = [UIColor clearColor];
        _textView.frame = CGRectMake(10, 20 + 64, UI_SCREEN_WITH - 20, UI_SCREEN_WITH *0.25);
    }
    return _textView;
}
- (UIButton *)submitBtn
{
    if (!_submitBtn) {
        UIButton *button = [[UIButton alloc]init];
        [button setTitle:@"提交" forState:UIControlStateNormal];
        [button setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        [button addTarget:self action:@selector(submitButtonClick:) forControlEvents:UIControlEventTouchUpInside];
        [button setBackgroundImage:[UIImage imageNamed:@"projectImage.bundle/signOut_image"] forState:UIControlStateNormal];
        button.frame = CGRectMake(UI_SCREEN_WITH/2.0 - UI_SCREEN_WITH *0.8125/2.0, self.textView.frameBottom + 20, UI_SCREEN_WITH *0.8125, UI_SCREEN_WITH *0.109375);
        _submitBtn = button;
    }
    return _submitBtn;
}
-(void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:YES];
    self.navigationItem.title = @"意见反馈";
}
- (void)viewDidLoad {
    [super viewDidLoad];
    [self.view addSubview:self.textView];
    [self.view addSubview:self.submitBtn];
}

-(void)submitButtonClick:(id)sender{
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
